const path = require('path')

module.exports = {
  lintOnSave: false,
  configureWebpack: {
    resolve: {
      extensions: ['.js', '.json', '.vue'],
      alias: {
        '@': path.resolve(__dirname, 'src/'),
        '_c': path.resolve(__dirname, 'src/components'),
        '_u': path.resolve(__dirname, 'src/utils'),
        '_a': path.resolve(__dirname, 'src/api')
      }
    },
  },
  devServer: {
    port: 8081,
    proxy: {
      '/api': {
        target: process.env.VUE_TARGET_URL,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    },
  },
  css: {
    loaderOptions: {
      less: {
        javascriptEnabled: true
      }
    }
  }
}
